<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>

<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jquery.colorbox.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jQselect.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>
<link href="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/colorbox2.css" rel="stylesheet" type="text/css"/>
</head>

<body>
	<div id="main">
		<div id="navigation">当前位置：渠道列表</div>
  <div id="body">
			<div id="search">
				<form id="searchForm" name="searchForm" method="post" action="<?php echo $this->projectUrl();?>">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td>
								渠道名称：
				                  <input type="text" id="name" name="name" value="<?php echo $this->name;?>" class="input">
								渠道编号：
								<input type="text" id="code" name="code" value="<?php echo $this->code;?>" class="input">
								&nbsp;<br />
								审核状态：
								<select name="status" id="status">
                                <option value="-1"
                                 <?php if(!isset($this->status)||$this->status=='-1'):?>
                                  selected="selected"
                                  <?php endif;?>
                                  >所有状态</option>
								  <option value="0"
                                  <?php if($this->status===0):?>
                                  selected="selected"
                                  <?php endif;?>
                                  >待审核</option>
								  <option value="1"
                                   <?php if($this->status=='1'):?>
                                  selected="selected"
                                  <?php endif;?>
                                  >未通过</option>
								  <option value="2"
                                   <?php if($this->status=='2'):?>
                                  selected="selected"
                                  <?php endif;?>>通过</option>
							    </select>
								&nbsp;
							  <input type="submit" name="button" id="button" value="查找" class="button" />
							</td>
					  </tr>
					</table>
				</form>
			</div>
			<div id="content">
				<form id="listForm" name="listForm" method="post" action="">
					<table class="table">
						<tr class="subject">
                     
							<td width="5%" class="checkBoxTd">选择</td>
                       
							<td>渠道名称</td>
							<td>渠道编号</td>
							<td>审核状态</td>
							<td>注册时间</td>
							<td class="checkBoxTd">操作</td>
						</tr>
                        <?php foreach($this->rows as $row):?>
						<tr class="dataLine">
                       
							<td width="5%" class="checkBoxTd"><input type="checkbox" name="selectId[]" id="select0" class="selectCheckBox" value="<?php echo $row['id'];?>" /></td>
                          
							<td><?php echo $row['name'];?></td>
							<td><?php echo $row['code'];?></td>
							<td><?php if($row['status']=="0")
														{
															echo '待审核';
														}
														elseif($row['status']=="1")
														{
															echo '已审核通过';
														}
														elseif($row['status']=="2")
														{
															echo '已审核未通过';
														}
											?></td>
							<td><?php echo $row['addTime'];?></td>
							<td class="checkBoxTd"><a href="<?php echo $this->projectUrl(array('id'=>$row['id'], 'action'=>'update-'.$this->suffix,'backUrl'=>urlencode($this->pageUrl)));?>">编辑</a></td>
						</tr>
                        <?php endforeach;?>
					</table>
<table class="controlTable">
						<tr>
							<td align="left"><input type="button" name="all" id="all" value="全选" class="button" onclick="$('.selectCheckBox').attr('checked', true);"/>
								<input type="button" name="cancel" id="cancel" value="取消" class="button" onclick="$('.selectCheckBox').attr('checked', false);"/>
                                
								<input type="submit" name="delete" id="delete" value="删除选中" class="button" onclick="return del();"/></td>
							 <td colspan="6" class="paginator"><div align="right"><?php echo $this->pageString;?></div></td>
		  </tr>
				  </table>
			  </form>
			</div>
		</div>
</div>
<script language="javascript">
function del()
{
	if (confirm('确定删除吗？')) {
		$("#listForm").attr('action', '<?php echo $this->projectUrl(array('action'=>'delete','backUrl'=>urlencode($this->pageUrl))) ;?>');
		$("#listForm").submit();
		return true;
	} else {
		return false;
	}
}
</script>
</body>
</html>